<?php
class Application_Model_Tutores extends Zend_Db_Table_Abstract
{
    protected $_name ='tutor';
    protected $_primary ='id_tutor';
    protected $_referenceMap    = array(
            'persona' => array(
            'columns'           => array('id_persona'),
            'refTableClass'     => 'Application_Model_Persona2',
            'refColumns'        => array('id_persona')
        ),'registro' => array(
            'columns'           => array('id_registro'),
            'refTableClass'     => 'Application_Model_Registros',
            'refColumns'        => array('id_registro')
        )); 


    public function getAll()
    {
        return $this->fetchAll();
    }
    public function save($ci,$profesion,$id_persona,$id_registro)
    {
        $row=$this->createRow();
        $row->ci=$ci;
        $row->profesion=$profesion;
        $row->id_persona=$id_persona;
        $row->id_registro=$id_registro;
        return $row->save(); 
    }
    public function getRow($id){
        $id=(int)$id;
        $row=$this->find($id)->current();
        return $row;
    }
}